package top.whysu.gps.exception;

import top.whysu.gps.constant.CodeConstant;

/**
 * 业务异常
 */
public class BusinessException extends RuntimeException {

    /***
     * 响应码 {@link CodeConstant}
     */
    private Integer code;

    /***
     * 响应信息
     */
    private String message;

    public BusinessException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}

